package Model;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class Refrigerator {

	public static String get7DData(String rawData) {
		String result = "";
		rawData = rawData.replaceAll(" +", " ");
//		System.out.println(rawData);
		String arrayData[] = rawData.split(" ");
//		for (int i = 0; i < arrayData.length; i++) {
//			System.out.println(arrayData[i]);
//		}
		
		int intCount;
		Integer countNum = 1;
		String washOrderCommand = "";

		// 冷藏室显示温度1
		String refrigeratorTemperatureC = arrayData[12];
		intCount = Integer.parseInt(refrigeratorTemperatureC, 16);
		washOrderCommand = Integer.toString((intCount - 38));
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻室显示温度2
		String freezerTemperatureC = arrayData[13];
		intCount = Integer.parseInt(freezerTemperatureC, 16);
		washOrderCommand = Integer.toString((intCount - 38));
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 变温室显示温度3
		String vtRoomTemperature = arrayData[14];
		intCount = Integer.parseInt(vtRoomTemperature, 16);
		washOrderCommand = Integer.toString((intCount - 38));
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 变温室2显示温度
		// String vtRoomTemperature2 = arrayData[15];

		// 环境温度4
		String envTemperature = arrayData[16];
		intCount = Integer.parseInt(envTemperature, 16);
		washOrderCommand = Integer.toString((intCount - 38));
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 环境湿度5
		String envHumidity = arrayData[17];
		intCount = Integer.parseInt(envHumidity, 16);
		washOrderCommand = Integer.toString(intCount);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷藏室设置档位6
		String refrigeratorTargetTempLevel = arrayData[18];
		intCount = Integer.parseInt(refrigeratorTargetTempLevel, 16);
		if (refrigeratorTargetTempLevel == "00") {
			washOrderCommand = "OFF";
		} else {
			washOrderCommand = Integer.toString((intCount - 1));// + "或" + (intCount + 30) + "℉";
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻室设置档位7
		String freezerTargetTempLevel = arrayData[19];
		intCount = Integer.parseInt(freezerTargetTempLevel, 16);
		washOrderCommand = Integer.toString((intCount - 30));// + "℃" + "或" + (intCount - 12) + "℉";
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 变温室设置温度档位8
		String vtRoomTargetLevel1 = arrayData[20];
		intCount = Integer.parseInt(vtRoomTargetLevel1, 16);
		if (vtRoomTargetLevel1 == "00") {
			washOrderCommand = "OFF";
		} else {
			washOrderCommand = (intCount - 31) + "℃" + "/" + (intCount + 16) + "℉";
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 强制删除，制冰机工作模式，制冰机开关状态，节能功能状态，变温室开关状态，冷藏室开关状态
		String rveiif = arrayData[24];
		String rveiifbinaryString = Integer.toBinaryString(Integer.parseInt(rveiif, 16));
		while (rveiifbinaryString.length() < 8) {
			rveiifbinaryString = "0" + rveiifbinaryString;
		}
		// 强制删除9
		char forceDelete = rveiifbinaryString.charAt(7);
		switch (forceDelete) {
		case '0':
			washOrderCommand = "无";
			break;
		case '1':
			washOrderCommand = "有";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";
		
		// 节能功能状态10
		char energySavingStatus = rveiifbinaryString.charAt(2);
		switch (energySavingStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 锁定状态，人工智慧，假日模式，速冻功能状态，速冷功能状态，保鲜灯，开关机状态
		String lihqqpo = arrayData[25];
		String lihqqpobinaryString = Integer.toBinaryString(Integer.parseInt(lihqqpo, 16));
		while (lihqqpobinaryString.length() < 8) {
			lihqqpobinaryString = "0" + lihqqpobinaryString;
		}
		// 人工智慧11
		char intelligenceMode = lihqqpobinaryString.charAt(1);
		switch (intelligenceMode) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";
		
		// 速冻功能状态12
		char quickFreezingMode = lihqqpobinaryString.charAt(3);
		switch (quickFreezingMode) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";
		
		// 速冷功能状态13
		char quickRefrigeratoringMode = lihqqpobinaryString.charAt(4);
		switch (quickRefrigeratoringMode) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";
		
		// 假日模式14
		char holidayMode = lihqqpobinaryString.charAt(2);
		switch (holidayMode) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 商场演示功能状态，大冷藏功能状态，华氏度显示功能状态，ABT杀菌功能状态，急冻室开关状态，健康卫士开关状态，速便问功能状态，人感状态
		String swfasavh = arrayData[26];
		String swfasavhbinaryString = Integer.toBinaryString(Integer.parseInt(swfasavh, 16));
		while (swfasavhbinaryString.length() < 8) {
			swfasavhbinaryString = "0" + swfasavhbinaryString;
		}
		// 商场演示功能状态15
		char showStatus = swfasavhbinaryString.charAt(0);
		switch (showStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷藏室门开关状态，变温室门开关状态，快速制冰功能状态，杀菌功能状态，强效净化功能状态，人感功能开关状态
		String rfvqssh = arrayData[27];
		String rfvqsshbinaryString = Integer.toBinaryString(Integer.parseInt(rfvqssh, 16));
		while (rfvqsshbinaryString.length() < 8) {
			rfvqsshbinaryString = "0" + rfvqsshbinaryString;
		}
		// 冷藏室门开关状态16
		char refrigeratorDoorStatus = rfvqsshbinaryString.charAt(0);
		switch (refrigeratorDoorStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻室门开关状态17
		char freezerDoorStatus = rfvqsshbinaryString.charAt(1);
		switch (freezerDoorStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 珍品功能状态，摄像头功能状态，安防功能状态，酸奶机开关状态，安息日功能状态，速变温2功能状态，冷冻杀菌功能状态
		String rcsysvf = arrayData[28];
		String rcsysvfbinaryString = Integer.toBinaryString(Integer.parseInt(rcsysvf, 16));
		while (rcsysvfbinaryString.length() < 8) {
			rcsysvfbinaryString = "0" + rcsysvfbinaryString;
		}
		// 珍品功能状态18
		char rareFoodKeepingStatus = rcsysvfbinaryString.charAt(0);
		switch (rareFoodKeepingStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		
		
		String prfvibvc = arrayData[29];
		String prfvibvcbinaryString = Integer.toBinaryString(Integer.parseInt(prfvibvc, 16));
		while (prfvibvcbinaryString.length() < 8) {
			prfvibvcbinaryString = "0" + prfvibvcbinaryString;
		}
		// 冷藏室门2开关状态19
		char refrigerator2DoorStatus = prfvibvcbinaryString.charAt(1);
		switch (refrigerator2DoorStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻室门2开关状态20
		char freezer2DoorStatus = prfvibvcbinaryString.charAt(2);
		switch (freezer2DoorStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		
		String dddv = arrayData[30];
		String dddvbinaryString = Integer.toBinaryString(Integer.parseInt(dddv, 16));
		while (dddvbinaryString.length() < 8) {
			dddvbinaryString = "0" + dddvbinaryString;
		}
		// 日常功能状态21
		char dailyStatus = dddvbinaryString.charAt(2);
		switch (dailyStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 大量存储功能状态22
		char vastStoreStatus = dddvbinaryString.charAt(3);
		switch (vastStoreStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		
		
		String wdhk = arrayData[31];
		String wdhkbinaryString = Integer.toBinaryString(Integer.parseInt(wdhk, 16));
		while (wdhkbinaryString.length() < 8) {
			wdhkbinaryString = "0" + wdhkbinaryString;
		}
		// 除湿功能状态23
		char dehumidificationStatus = wdhkbinaryString.charAt(5);
		switch (dehumidificationStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 把手灯开关状态24
		char handLeLightStatus = wdhkbinaryString.charAt(6);
		switch (handLeLightStatus) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷藏室实际温度25
		String refrigeratorSensorTemp = arrayData[40] + arrayData[41];
		intCount = Integer.parseInt(refrigeratorSensorTemp, 16);
		DecimalFormat fnum = new DecimalFormat("##0.00");
		washOrderCommand = fnum.format(-38 + intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻室实际温度26
		String freezerSensorTemp = arrayData[46] + arrayData[47];
		intCount = Integer.parseInt(freezerSensorTemp, 16);
		fnum = new DecimalFormat("##0.00");
		washOrderCommand =fnum.format(-38 + intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻化霜实际温度27
		String freezerDefrostingSensorTemp = arrayData[48] + arrayData[49];
		intCount = Integer.parseInt(freezerDefrostingSensorTemp, 16);
		fnum = new DecimalFormat("##0.00");
		washOrderCommand =fnum.format(-38 + intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 环温实际温度28
		String envSensorTemp = arrayData[50] + arrayData[51];
		intCount = Integer.parseInt(envSensorTemp, 16);
		fnum = new DecimalFormat("##0.00");
		washOrderCommand = fnum.format(-38 + intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 左变温室实际温度29
		String leftVTRoomSensorTemp = arrayData[52] + arrayData[53];
		intCount = Integer.parseInt(leftVTRoomSensorTemp, 16);
		fnum = new DecimalFormat("##0.00");
		washOrderCommand =fnum.format(-38 + intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 右变温室实际温度
		// String rightVTRoomSensorTemp = arrayData[54] + arrayData[55];
		// intCount = Integer.parseInt(rightVTRoomSensorTemp, 16);
		// fnum = new DecimalFormat("##0.00");
		// washOrderCommand = "右变温室实际温度：" + fnum.format(-38 + intCount * 0.1) +
		// "℃";
		// result = (countNum++) + ":" + washOrderCommand + "@";

		// 人感状态30
		String humanSensingResult = arrayData[69];
		switch (humanSensingResult) {
		case "00":
			washOrderCommand = "人感未检测到人";
			break;
		case "01":
			washOrderCommand = "人感检测到人";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 光感状态31
		String lightSensingStatus = arrayData[70];
		intCount = Integer.parseInt(lightSensingStatus, 16);
		washOrderCommand = Integer.toString(intCount);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻风机电压32
		String freezerFanStatus = arrayData[71];
		intCount = Integer.parseInt(freezerFanStatus, 16);
		fnum = new DecimalFormat("##0.00");
		washOrderCommand = fnum.format(intCount * 0.1);
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 压机1频率33
		String compressor1Frequency = arrayData[75];
		intCount = Integer.parseInt(compressor1Frequency, 16);
		washOrderCommand =Integer.toString(intCount) ;
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		
		
		String aaaaaa = arrayData[77];
		String aaaaaabinaryString = Integer.toBinaryString(Integer.parseInt(aaaaaa, 16));
		while (aaaaaabinaryString.length() < 8) {
			aaaaaabinaryString = "0" + aaaaaabinaryString;
		}
		// 冷藏风门状态34
		char airDoor1Status = aaaaaabinaryString.charAt(0);
		switch (airDoor1Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 变温风门状态35
		char airDoor3Status = aaaaaabinaryString.charAt(2);
		switch (airDoor3Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		
		
		String hhhhhhh = arrayData[81];
		String hhhhhhhbinaryString = Integer.toBinaryString(Integer.parseInt(hhhhhhh, 16));
		while (hhhhhhhbinaryString.length() < 8) {
			hhhhhhhbinaryString = "0" + hhhhhhhbinaryString;
		}
		// 加热丝1状态36
		char heaterStrip1Status = hhhhhhhbinaryString.charAt(0);
		switch (heaterStrip1Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 冷冻化霜加热丝状态37
		char heaterStrip2Status = hhhhhhhbinaryString.charAt(1);
		switch (heaterStrip2Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 立（竖）梁加热丝状态38
		char heaterStrip5Status = hhhhhhhbinaryString.charAt(4);
		switch (heaterStrip5Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		// 变温室底部补偿加热丝状态39
		char heaterStrip6Status = hhhhhhhbinaryString.charAt(5);
		switch (heaterStrip6Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		
		String lllllll = arrayData[83];
		String lllllllbinaryString = Integer.toBinaryString(Integer.parseInt(lllllll, 16));
		while (lllllllbinaryString.length() < 8) {
			lllllllbinaryString = "0" + lllllllbinaryString;
		}
		// 冷藏面光源状态40
		char light1Status = lllllllbinaryString.charAt(0);
		switch (light1Status) {
		case '0':
			washOrderCommand = "关";
			break;
		case '1':
			washOrderCommand = "开";
			break;
		default:
			break;
		}
		result += (countNum++) + ":" + washOrderCommand + "@";

		return result;
	}

	public String getAlarm(String rawData) {
		rawData = rawData.replaceAll(" +", " ");
		String arrayData[] = rawData.split(" ");
		String message = arrayData[12] + arrayData[13] + arrayData[14] + arrayData[15] + arrayData[16] + arrayData[17]
				+ arrayData[18] + arrayData[19];
		System.out.println(message);
		String binaryStr = "";
		String alarmSignificant = "";
		for (int i = 0; i < message.length(); i++) {
			String s = Integer.toBinaryString(Integer.parseInt(String.valueOf(message.charAt(i)), 16));
			// 拼接串 拼成4位
			while (s.length() < 4) {
				s = "0" + s;
			}
			binaryStr += s;
		}
		System.out.println("输出二进制:" + binaryStr);
		List<Integer> addr = new ArrayList<Integer>();
		if (binaryStr.contains("1")) {
			for (int j = 0; j < binaryStr.length(); j++) {
				if (String.valueOf(binaryStr.charAt(j)).equals("1")) {
					addr.add(j);
				}
			}
		} else {
			addr.add(64);
		}

		/***
		 * 从第0开始的 重新定判定报警信息: bianaryStr为0 则解除报警,固定j=64为告警解除
		 * 在bianaryStr中第(63)位出现为:环境温度传感器故障 在bianaryStr中第(62)位出现为:冷藏室传感器故障
		 * 在bianaryStr中第(61)位出现为:预留 在bianaryStr中第(60)出现为:冷冻室传感器故障
		 * 在bianaryStr中第(59)出现为:变温室传感器故障 在bianaryStr中第(58)出现为:预留
		 * 在bianaryStr中第(57)出现为:预留 在bianaryStr中第(56)出现为:预留
		 * 在bianaryStr中第(55)出现为:冷冻化霜传感器故障 在bianaryStr中第(54)出现为:预留
		 * 在bianaryStr中第(53)出现为:显示板与主板通讯故障 在bianaryStr中第(52)出现为:预留
		 * 在bianaryStr中第(51)出现为:冷冻室风机故障 在bianaryStr中第(50)出现为:预留
		 * 在bianaryStr中第(49)出现为:冷冻化霜故障 在bianaryStr中第(48)出现为:湿度传感器故障
		 * 在bianaryStr中第(47)出现为:预留 在bianaryStr中第(46)出现为:预留
		 * 在bianaryStr中第(45)出现为:预留 在bianaryStr中第(44)出现为:预留
		 * 在bianaryStr中第(43)出现为:人感传感器故障 在bianaryStr中第(42)出现为:光感传感器故障
		 * 在bianaryStr中第(41)出现为:预留 在bianaryStr中第(40)出现为:预留
		 * 在bianaryStr中第(39)出现为:预留 在bianaryStr中第(38)出现为:预留
		 * 在bianaryStr中第(37)出现为:预留 在bianaryStr中第(36)出现为:预留
		 * 在bianaryStr中第(35)出现为:预留 在bianaryStr中第(34)出现为:预留
		 * 在bianaryStr中第(33)出现为:冷藏室门开关报警 在bianaryStr中第(32)出现为:预留
		 * 在bianaryStr中第(31)出现为:预留 在bianaryStr中第(30)出现为:冷冻室门开关报警
		 * 在bianaryStr中第(29)出现为:预留 在bianaryStr中第(28)出现为:预留
		 * 在bianaryStr中第(27)出现为:预留 在bianaryStr中第(26)出现为:预留
		 * 在bianaryStr中第(25)出现为:预留 在bianaryStr中第(24)出现为:预留
		 * 在bianaryStr中第(23)出现为:预留 在bianaryStr中第(22)出现为:预留
		 * 在bianaryStr中第(21)出现为:预留 在bianaryStr中第(20)出现为:预留
		 * 在bianaryStr中第(19)出现为:预留 在bianaryStr中第(18)出现为:预留
		 * 在bianaryStr中第(17)出现为:预留 在bianaryStr中第(16)出现为:预留
		 * 在bianaryStr中第(15)出现为:预留 在bianaryStr中第(14)出现为:预留
		 * 在bianaryStr中第(13)出现为:预留 在bianaryStr中第(12)出现为:预留
		 * 在bianaryStr中第(11)出现为:预留 在bianaryStr中第(10)出现为:预留
		 * 在bianaryStr中第(9)出现为:预留 在bianaryStr中第(8)出现为:变温1通讯故障（负载板1）
		 * 
		 **/

		for (int k = 0; k < addr.size(); k++) {
			switch (addr.get(k)) {
			case 64:
				alarmSignificant += "告警解除";
				alarmSignificant += "@/";
				break;
			case 63:
				alarmSignificant += "环境温度传感器故障";
				alarmSignificant += "@F2,";
				break;
			case 62:
				alarmSignificant += "冷藏室传感器故障";
				alarmSignificant += "@F3,";
				break;
			case 61:
				alarmSignificant += "冷藏化霜传感器故障";
				alarmSignificant += "@F1,";
				break;
			case 60:
				alarmSignificant += "冷冻室传感器故障";
				alarmSignificant += "@F4,";
				break;
			case 59:
				alarmSignificant += "变温室传感器故障";
				alarmSignificant += "@F5,";
				break;
			case 58:
				alarmSignificant += "变温室化霜传感器故障";
				alarmSignificant += "@F9,";
				break;
			case 57:
				alarmSignificant += "饮品室传感器故障";
				alarmSignificant += "@FA,";
				break;
			case 56:
				alarmSignificant += "饮品室蒸发传感器故障";
				alarmSignificant += "@Fb,";
				break;
				
			case 55:
				alarmSignificant += "冷冻化霜传感器故障";
				alarmSignificant += "@F6,";
				break;
			case 54:
				alarmSignificant += "冷藏室传感器2故障";
				alarmSignificant += "@F8,";
				break;
			case 53:
				alarmSignificant += "显示板与主板通讯故障";
				alarmSignificant += "@E0,";
				break;
			case 52:
				alarmSignificant += "制冰机传感器故障";
				alarmSignificant += "@FC,";
				break;

			case 51:
				alarmSignificant += "冷冻室风机故障";
				alarmSignificant += "@E1,";
				break;
			case 50:
				alarmSignificant += "冷却风机故障";
				alarmSignificant += "@E2,";
				break;
			case 49:
				alarmSignificant += "冷冻化霜故障";
				alarmSignificant += "@Ed,";
				break;
			case 48:
				alarmSignificant += "湿度传感器故障";
				alarmSignificant += "@Eh,";
				break;
			case 47:
				alarmSignificant += "制冰室传感器故障";
				alarmSignificant += "@Fd,";
				break;
			case 46:
				alarmSignificant += "制冰机故障";
				alarmSignificant += "@Er,";
				break;
			case 45:
				alarmSignificant += "冷藏化霜故障";
				alarmSignificant += "@EC,";
				break;
			case 44:
				alarmSignificant += "冰温室传感器故障";
				alarmSignificant += "@F7,";
				break;

			case 43:
				alarmSignificant += "人感传感器故障";
				alarmSignificant += "@FE,";
				break;
			case 42:
				alarmSignificant += "光感传感器故障";
				alarmSignificant += "@FF,";
				break;
			case 41:
				alarmSignificant += "变温传感器2故障";
				alarmSignificant += "@F0,";
				break;
			case 40:
				alarmSignificant += "冷藏室风机故障";
				alarmSignificant += "@E6,";
				break;
			case 39:
				alarmSignificant += "自动出水传感器故障";
				alarmSignificant += "@Fh,";
				break;
			case 38:
				alarmSignificant += "制冰室风机故障";
				alarmSignificant += "@E3,";
				break;
			case 37:
				alarmSignificant += "真空泵故障";
				alarmSignificant += "@E4,";
				break;
			case 36:
				alarmSignificant += "真空保鲜室故障";
				alarmSignificant += "@E5,";
				break;
			case 35:
				alarmSignificant += "瓣边错误故障";
				alarmSignificant += "@Eb,";
				break;
			case 34:
				alarmSignificant += "变温室化霜故障";
				alarmSignificant += "@EE,";
				break;

			case 33:
				alarmSignificant += "冷藏室1门开关报警";
				alarmSignificant += "@P2,";
				break;
			case 32:
				alarmSignificant += "冷藏室2门开关报警";
				alarmSignificant += "@P3,";
				break;
			case 31:
				alarmSignificant += "直流加热丝1故障";
				alarmSignificant += "@E9,";
				break;
			case 30:
				alarmSignificant += "冷冻室1门开关报警";
				alarmSignificant += "@P0,";
				break;
			case 29:
				alarmSignificant += "冷冻室2门开关报警";
				alarmSignificant += "@P1,";
				break;
			case 28:
				alarmSignificant += "制冰室门开关报警";
				alarmSignificant += "@PA,";
				break;
			case 27:
				alarmSignificant += "变温室1门开关报警";
				alarmSignificant += "@P4,";
				break;
			case 26:
				alarmSignificant += "变温室2门开关报警";
				alarmSignificant += "@P9,";
				break;
			case 25:
				alarmSignificant += "变吧台1门开关报警";
				alarmSignificant += "@P5,";
				break;
			case 24:
				alarmSignificant += "变温风机故障";
				alarmSignificant += "@E8,";
				break;
			case 23:
				alarmSignificant += "干区传感器故障";
				alarmSignificant += "@Fr,";
				break;
			case 22:
				alarmSignificant += "精控传感器1故障";
				alarmSignificant += "@U3,";
				break;
			case 21:
				alarmSignificant += "精控传感器2故障";
				alarmSignificant += "@U4,";
				break;
			case 20:
				alarmSignificant += "精控传感器3故障";
				alarmSignificant += "@U5,";
				break;
			case 15:
				alarmSignificant += "酸奶机传感器故障";
				alarmSignificant += "@/,";
				break;
			case 14:
				alarmSignificant += "酸奶机故障";
				alarmSignificant += "@/,";
				break;
			case 13:
				alarmSignificant += "功率损耗故障";
				alarmSignificant += "@/,";
				break;
			case 12:
				alarmSignificant += "Wifi通信故障";
				alarmSignificant += "@U0,";
				break;
			case 11:
				alarmSignificant += "箱内光感故障（光容积1）";
				alarmSignificant += "@FL,";
				break;
			case 10:
				alarmSignificant += "湿区传感器故障";
				alarmSignificant += "@FT,";
				break;
			case 9:
				alarmSignificant += "MSA门开关报警";
				alarmSignificant += "@Pb,";
				break;
			case 8:
				alarmSignificant += "变温1通讯故障（负载板1）";
				alarmSignificant += "@U6,";
				break;
			case 7:
				alarmSignificant += "变温2通讯故障（负载板2）";
				alarmSignificant += "@B2,";
				break;
			case 6:
				alarmSignificant += "臭氧模块故障（臭氧模块开故障）";
				alarmSignificant += "@UE,";
				break;
			case 5:
				alarmSignificant += "臭氧模块故障（臭氧模块关故障）";
				alarmSignificant += "@UF,";
				break;
			case 4:
				alarmSignificant += "制冰机板通讯故障（负载板3）";
				alarmSignificant += "@B1,";
				break;
			case 3:
				alarmSignificant += "微风道板通讯故障（负载板4）";
				alarmSignificant += "@U7,";
				break;
			case 2:
				alarmSignificant += "MSA通讯故障（负载板5）";
				alarmSignificant += "@B1,";
				break;
			case 1:
				alarmSignificant += "箱内光感故障（光容积2）";
				alarmSignificant += "@FU,";
				break;
			case 0:
				alarmSignificant += "箱内光感故障（光容积3）";
				alarmSignificant += "@FN,";
				break;

			default:
				break;
			}
		}

		return alarmSignificant;
	}

	public static void main(String[] args) {
//		String alarm1 = "FF FF 16 00 00 00 00 00 00 04 0F 5A 00 00 00 00 00 00 00 00 84";
		String test_7Dorder = "FF FF 54 00 00 00 00 00 00 06 7D 01 38 32 35 00 3D 00 05 0B 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 33 00 00 00 00 01 93 01 73 02 62 02 1B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 78 00 00 00 71 00 05 00 00 00 00 00 00 00 00 91 ";
		System.out.println(Refrigerator.get7DData(test_7Dorder));
		
		//		// Dryer.get7DData(test_7Dorder);
	}

}
